<template>
  <ModalRender
    :modalObj="dataGrawObj"
    @setModalObj="e => dataGrawObj = e"
    @close="() => {dataGrawObj.isShow = false;emit('close')}"
    @cancel="() => {dataGrawObj.isShow=false;emit('cancel')}"
    @confirm="dataGrawObj.isShow=false;emit('confirm')"
  >
    <div class="pl30 pt30 pb30 pr30">
      <div v-if="name" class="g329cff fs16 mb10 b tc">{{ name }}</div>
      <div v-html="content" class="fs16"></div>
      <div v-if="!isSoftDel" class="gred fs12 mt8 f ac xc">删除后将不可恢复！</div>
      <div class="f ac xc fs14 mt20">
        <div @click="dataGrawObj.isShow=false;emit('cancel')" class="mr15 f ac xc rds30 bdc none poi" style="width:100px;height:32px;"><div style="transform:translateY(-1px)">取消</div></div>
        <div @click="dataGrawObj.isShow=false;emit('confirm')" class="bgec6102 f ac xc rds30 gf none poi" style="width:100px;height:32px;"><div style="transform:translateY(-1px)">确认删除</div></div>
      </div>
    </div>
  </ModalRender>
</template>
<script>
import f from "./index.js"
import ModalRender from "@/renderEngine/ModalRender/index.vue"
export default {
  components: {
    ModalRender
  },
  props: {
    name: { type: [String, Number], default: '' },
    content: { type: String, default: '' },
    isShowClose: { type: Boolean, default: false },
    isShowCancel: { type: Boolean, default: true },
    isShowConfirm: { type: Boolean, default: true },
    isSoftDel: { type: Boolean, default: false }, // 是否软删除
  },
  emits: ['close', 'cancel', 'confirm'],
  setup(props, { emit }) {
    return f(props, emit)
  }
}
</script>
<style scoped></style>